import axios from 'axios';
const MAKA_HOST = 'https://maka.im/api';

export const login = (email, password) => {
  return axios.post(`${MAKA_HOST}/designer/login`, {
    email,
    password
  }, {
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    }
  });
}

export const getOssSts2 = (token, cookie) => {
  return axios.get(`${MAKA_HOST}/ossSts2?token=${token}`, {
    headers: {
      cookie
    }
  });
}

export const upload = (path, data, headers) => {
  // return axios.put({
	// 	url: path,
	// 	headers: headers,
	// 	data: data
	// });
  return axios.put(path, data, { headers });
};